package com.github.wxiaoqi.security.biz.modules.pay.api;

import javax.validation.Valid;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.wxiaoqi.security.biz.common.cms.request.CmsPayOrderQueryRequest;
import com.github.wxiaoqi.security.biz.modules.pay.biz.CmsPayOrderBiz;
import com.github.wxiaoqi.security.biz.modules.pay.entity.CmsPayOrder;
import com.github.wxiaoqi.security.common.msg.TableResultResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 支付订单相关接口
 * @author he
 *
 */
@Api(tags="支付订单管理")
@Controller
@RequestMapping("cmsPayOrders")
public class CmsPayOrderController extends BaseController<CmsPayOrderBiz, CmsPayOrder> {
	
	private static final Logger logger = (Logger) LoggerFactory.getLogger(CmsPayOrderController.class);
	

	/**
	 * 列表
	 * @return
	 * @throws Exception 
	 */ 
	@ApiOperation("支付订单列表")
	@RequestMapping(value = "/list",method = RequestMethod.POST)
    @ResponseBody
    public TableResultResponse<CmsPayOrder> orderList(@RequestBody @Valid CmsPayOrderQueryRequest param) throws Exception {
		logger.info("查询支付订单列表，请求参数。。。{}"+param);
		return baseBiz.payOrderList(param);
    }
}
